<%@ page import="com.hy.model.Student" %>
<%@ page import="java.util.List" %><%--
  Created by IntelliJ IDEA.
  User: yoka24443
  Date: 2018-4-24
  Time: 19:26
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Student List</title>
</head>
<body>
    <form id="search" method="get" action="./findStudentAction">
        <input type="text" id="studentName" name="studentName" />
        <input type="submit" id="btn_Search" value="姓名查找" />
    </form>
    <table>
        <thead>
            <tr>
                <th align="left">学号</th>
                <th align="left">姓名</th>
                <th align="left">班级</th>
                <th>年龄</th>
                <th>电话</th>
                <th>操作</th>
            </tr>
        </thead>
        <tbody>
            <%
                List<Student> list = (List<Student>) session.getAttribute("studentList");
                for(Student model : list) {
            %>
            <tr>
                <td><%=model.getStudentNO()%></td>
                <td><%=model.getRealName()%></td>
                <td><%=model.getClassName()%></td>
                <td><%=model.getAge()%></td>
                <td><%=model.getTel()%></td>
                <td align="center">
                    <a href="studentTransferAction?studentNO=<%=model.getStudentNO()%>">修改</a>
                    <a href="deleteStudentAction?studentNO=<%=model.getStudentNO()%>">删除</a>
                </td>
            </tr>
            <%}%>
        </tbody>
    </table>
</body>
</html>
